package 懒汉单例;

public class 懒汉单例 {
    public static void main(String[] args) {
        test n1=test.getTest();
        test n2=test.getTest();
        n2.age=10;
        System.out.println(n1.age);//10
        //指向同一个对象
    }
}
